"""
最小倍数

 能被1到10这10个数整除的最小的正数是2520。计算最小的能够被1到20整除的正数。
"""

def is_prime(n):
    if n==1 or n==2:
        return True
    else:
        for i in range(2,int(pow(n,0.5)+1)):
            if(n%i==0):
                return False
        else:
            return True

def resolve(m):
    fac=[]
    i=2
    while i<=m:
        while m % i == 0:
            fac.append(i)
            m /= i
        i = i + 1
    return fac

num=1
factor=[]
for i in range(1,21):
    if is_prime(i):
        factor.append(i)        
    else:
        f=resolve(i)
        for j in f:
            if f.count(j)>factor.count(j):
                for k in range(0,f.count(j)-factor.count(j)):
                    factor.append(j)
for l in factor:
    num*=l
print(num)

            



# def an_decompose(num):
#     arr = []
#     ifg = 2
#     while num != 1:
#         if num % ifg == 0:
#             while num % ifg == 0:
#                 arr.append(ifg)
#                 num /= ifg
#         ifg = ifg + 1
#     return arr
# an=[]#20以内的数分解为质因数
# for i in range(2,21):
#     for w in an_decompose(i):   
#         an.append(w)
# def an_list(list1,list2):
#     for i in list2:
#         while list1.count(i)<list2.count(i):
#             list1.append(i)
#     return list1
# an=list(set(an))
# fan=2
# while fan<=20:#如果一个数的全部质因数包括在an里，则不增加。否则少几个加几个。
#     an=an_list(an,an_decompose(fan))
#     fan+=1
# fan=1#计算最终的乘积
# for i in an:
#     fan*=i
# print(fan)
# 答案：232792560



